package com.zksite.nator.common.model;

import java.io.Serializable;

import com.zksite.nator.common.constants.ErrorCode;

public class ResponseModel implements Serializable {

	private static final long serialVersionUID = -5723650007016164627L;

	private String ret;

	private String msg;

	private Object data;

	public ResponseModel() {
		this.ret = ErrorCode.NORMAL.getErrcode();
		this.msg = ErrorCode.NORMAL.getErrm();
	}

	public ResponseModel(Object data) {
		this.ret = ErrorCode.NORMAL.getErrcode();
		this.msg = ErrorCode.NORMAL.getErrm();
		this.data = data;
	}

	public ResponseModel(String ret, String msg, Object data) {
		this.ret = ret;
		this.msg = msg;
		this.data = data;
	}

	public ResponseModel(ErrorCode code, Object data) {
		this.data = data;
		this.msg = code.getErrm();
		this.ret = code.getErrcode();
	}

	public String getRet() {
		return ret;
	}

	public void setRet(String ret) {
		this.ret = ret;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

}
